import random
import requests


def gen_id():
    ids = [1, 5, 7, 11, 12]
    return random.choice(ids)


def gen_price():
    r = random.random()
    if r < 0.4:
        return random.randint(3000, 4000)
    elif r < 0.7:
        return random.randint(4000, 6000)
    else:
        # 这里你需要确定一个上限值，比如10000
        return random.randint(6000, 10000)


def gen_amount():
    return random.randint()


for i in range(100):
    id = gen_id()
    price = gen_price()
    amount = gen_amount()
    url = f"http://www.test.com/order/place?id={id}&price={price}&amount={amount}"
    reponse = requests.get(url)
    print(reponse.status_code)
    print(reponse.json())
